public class Test {
    public static void main(String[] args) {
        int n = 8;
        Cal cal = new Cal();
        int arr[] = {-5,5,-89,-4,5,-5,1,2};
        int arr1[] = {-5,5,-9,-4,5,-52,1,22};
        int arr2[] = {-5,5,-10,-4,15,-5,21,2};
        int arr3[] = {-5,5,-1,-4,5,-5,1,2};
        System.out.println(cal.MaxSubSumOfSequence(arr,n));
        System.out.println(cal.MaxSubSumOfSequence(arr1,n));
        System.out.println(cal.MaxSubSumOfSequence(arr2,n));
        System.out.println(cal.MaxSubSumOfSequence(arr3,n));

    }
}
